<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>留言板</title>
	<link rel="stylesheet" href="./1/css/bootstrap.min.css">
	<style type="text/css">
		.padd{
			margin-top: 80px;
		}
	</style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">留言板</a>
        </div>
      </div>
    </nav>
    <div class="col-md-12 padd">
    <?php foreach ($data as $k => $v) { ?>
    	<div class="alert <?php echo $color[array_rand($color)]; ?>" role="alert">
       		<strong><?php echo $v['username'] ?></strong> <?php echo $v['content'] ?><?php echo date('Y/m/d h/i/s',$v['create_time']) ?>
       		<a class="btn btn-danger" href="./dei.php?id=<?php echo $k; ?>" role='button'>删除</a>
       		<a class="btn btn-info" href="./db.php?id=<?php echo $k; ?>" role='button'>修改</a>
     	</div>
    <?php } ?>
    </div>
	<form class="form-inline" method="post" action="./bd.php">
 		 <div class="form-group">
		    <label for="exampleInputName2">名字</label>
		    <input type="text" class="form-control" id="exampleInputName2" name='username'>
		  </div>
		  <button type="submit" class="btn btn-default alert-danger">提交</button><br>
		  <textarea class="form-control col-md-12" rows="3" name='content'></textarea>
	</form>
</body>
</html>